import torch.nn as nn
import torch
import torch.nn.functional as F


#  定义网络和模型 三层的网络
class MLP(torch.nn.Module):
    def __init__(self):
        super(MLP, self).__init__()
        self.n_hidden1 = nn.Linear(9, 10)
        self.n_hidden2 = nn.Linear(10, 20)
        self.out = nn.Linear(20, 1)

    def forward(self, x):
        x= self.n_hidden1(x)
        x = nn.ReLU()(x)
        x = self.n_hidden2(x)
        x = nn.ReLU()(x)
        x = self.out(x)
        return x